/**
 */
package org.cmoine.perspectiveshare.model.impl;

import java.util.Collection;

import org.cmoine.perspectiveshare.model.AlwaysOffActionSetType;
import org.cmoine.perspectiveshare.model.AlwaysOnActionSetType;
import org.cmoine.perspectiveshare.model.DescriptorType;
import org.cmoine.perspectiveshare.model.FastViewsType;
import org.cmoine.perspectiveshare.model.HideToolbarItemIdType;
import org.cmoine.perspectiveshare.model.LayoutType;
import org.cmoine.perspectiveshare.model.NewWizardActionType;
import org.cmoine.perspectiveshare.model.PerspectiveActionType;
import org.cmoine.perspectiveshare.model.PerspectiveType;
import org.cmoine.perspectiveshare.model.PerspectivesPackage;
import org.cmoine.perspectiveshare.model.ShowInTimeType;
import org.cmoine.perspectiveshare.model.ShowViewActionType;
import org.cmoine.perspectiveshare.model.ViewType1;
import org.cmoine.perspectiveshare.model.WindowType;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Perspective Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getDescriptor <em>Descriptor</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getWindow <em>Window</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getAlwaysOnActionSet <em>Always On Action Set</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getAlwaysOffActionSet <em>Always Off Action Set</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getShowViewAction <em>Show View Action</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getShowInTime <em>Show In Time</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getNewWizardAction <em>New Wizard Action</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getPerspectiveAction <em>Perspective Action</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getHideToolbarItemId <em>Hide Toolbar Item Id</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getView <em>View</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getFastViews <em>Fast Views</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getFastViewBars <em>Fast View Bars</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getLayout <em>Layout</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getEditorAreaTrimState <em>Editor Area Trim State</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getEditorAreaVisible <em>Editor Area Visible</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getFixed <em>Fixed</em>}</li>
 *   <li>{@link org.cmoine.perspectiveshare.model.impl.PerspectiveTypeImpl#getVersion <em>Version</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class PerspectiveTypeImpl extends EObjectImpl implements PerspectiveType {
    /**
     * The cached value of the '{@link #getDescriptor() <em>Descriptor</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getDescriptor()
     * @generated
     * @ordered
     */
    protected DescriptorType descriptor;

    /**
     * The cached value of the '{@link #getWindow() <em>Window</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getWindow()
     * @generated
     * @ordered
     */
    protected WindowType window;

    /**
     * The cached value of the '{@link #getAlwaysOnActionSet() <em>Always On Action Set</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getAlwaysOnActionSet()
     * @generated
     * @ordered
     */
    protected EList<AlwaysOnActionSetType> alwaysOnActionSet;

    /**
     * The cached value of the '{@link #getAlwaysOffActionSet() <em>Always Off Action Set</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getAlwaysOffActionSet()
     * @generated
     * @ordered
     */
    protected EList<AlwaysOffActionSetType> alwaysOffActionSet;

    /**
     * The cached value of the '{@link #getShowViewAction() <em>Show View Action</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getShowViewAction()
     * @generated
     * @ordered
     */
    protected EList<ShowViewActionType> showViewAction;

    /**
     * The cached value of the '{@link #getShowInTime() <em>Show In Time</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getShowInTime()
     * @generated
     * @ordered
     */
    protected EList<ShowInTimeType> showInTime;

    /**
     * The cached value of the '{@link #getNewWizardAction() <em>New Wizard Action</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getNewWizardAction()
     * @generated
     * @ordered
     */
    protected EList<NewWizardActionType> newWizardAction;

    /**
     * The cached value of the '{@link #getPerspectiveAction() <em>Perspective Action</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getPerspectiveAction()
     * @generated
     * @ordered
     */
    protected EList<PerspectiveActionType> perspectiveAction;

    /**
     * The cached value of the '{@link #getHideToolbarItemId() <em>Hide Toolbar Item Id</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getHideToolbarItemId()
     * @generated
     * @ordered
     */
    protected EList<HideToolbarItemIdType> hideToolbarItemId;

    /**
     * The cached value of the '{@link #getView() <em>View</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getView()
     * @generated
     * @ordered
     */
    protected EList<ViewType1> view;

    /**
     * The cached value of the '{@link #getFastViews() <em>Fast Views</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getFastViews()
     * @generated
     * @ordered
     */
    protected FastViewsType fastViews;

    /**
     * The default value of the '{@link #getFastViewBars() <em>Fast View Bars</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getFastViewBars()
     * @generated
     * @ordered
     */
    protected static final String FAST_VIEW_BARS_EDEFAULT = null;

    /**
     * The cached value of the '{@link #getFastViewBars() <em>Fast View Bars</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getFastViewBars()
     * @generated
     * @ordered
     */
    protected String fastViewBars = FAST_VIEW_BARS_EDEFAULT;

    /**
     * The cached value of the '{@link #getLayout() <em>Layout</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getLayout()
     * @generated
     * @ordered
     */
    protected LayoutType layout;

    /**
     * The default value of the '{@link #getEditorAreaTrimState() <em>Editor Area Trim State</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getEditorAreaTrimState()
     * @generated
     * @ordered
     */
    protected static final byte EDITOR_AREA_TRIM_STATE_EDEFAULT = 0x00;

    /**
     * The cached value of the '{@link #getEditorAreaTrimState() <em>Editor Area Trim State</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getEditorAreaTrimState()
     * @generated
     * @ordered
     */
    protected byte editorAreaTrimState = EDITOR_AREA_TRIM_STATE_EDEFAULT;

    /**
     * This is true if the Editor Area Trim State attribute has been set.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     * @ordered
     */
    protected boolean editorAreaTrimStateESet;

    /**
     * The default value of the '{@link #getEditorAreaVisible() <em>Editor Area Visible</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getEditorAreaVisible()
     * @generated
     * @ordered
     */
    protected static final byte EDITOR_AREA_VISIBLE_EDEFAULT = 0x00;

    /**
     * The cached value of the '{@link #getEditorAreaVisible() <em>Editor Area Visible</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getEditorAreaVisible()
     * @generated
     * @ordered
     */
    protected byte editorAreaVisible = EDITOR_AREA_VISIBLE_EDEFAULT;

    /**
     * This is true if the Editor Area Visible attribute has been set.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     * @ordered
     */
    protected boolean editorAreaVisibleESet;

    /**
     * The default value of the '{@link #getFixed() <em>Fixed</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getFixed()
     * @generated
     * @ordered
     */
    protected static final byte FIXED_EDEFAULT = 0x00;

    /**
     * The cached value of the '{@link #getFixed() <em>Fixed</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getFixed()
     * @generated
     * @ordered
     */
    protected byte fixed = FIXED_EDEFAULT;

    /**
     * This is true if the Fixed attribute has been set.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     * @ordered
     */
    protected boolean fixedESet;

    /**
     * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getVersion()
     * @generated
     * @ordered
     */
    protected static final float VERSION_EDEFAULT = 0.0F;

    /**
     * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getVersion()
     * @generated
     * @ordered
     */
    protected float version = VERSION_EDEFAULT;

    /**
     * This is true if the Version attribute has been set.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     * @ordered
     */
    protected boolean versionESet;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected PerspectiveTypeImpl() {
        super();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return PerspectivesPackage.Literals.PERSPECTIVE_TYPE;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public DescriptorType getDescriptor() {
        return descriptor;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetDescriptor(DescriptorType newDescriptor, NotificationChain msgs) {
        DescriptorType oldDescriptor = descriptor;
        descriptor = newDescriptor;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR, oldDescriptor, newDescriptor);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
        return msgs;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setDescriptor(DescriptorType newDescriptor) {
        if (newDescriptor != descriptor) {
            NotificationChain msgs = null;
            if (descriptor != null)
                msgs = ((InternalEObject)descriptor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR, null, msgs);
            if (newDescriptor != null)
                msgs = ((InternalEObject)newDescriptor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR, null, msgs);
            msgs = basicSetDescriptor(newDescriptor, msgs);
            if (msgs != null) msgs.dispatch();
        }
        else if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR, newDescriptor, newDescriptor));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public WindowType getWindow() {
        return window;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetWindow(WindowType newWindow, NotificationChain msgs) {
        WindowType oldWindow = window;
        window = newWindow;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW, oldWindow, newWindow);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
        return msgs;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setWindow(WindowType newWindow) {
        if (newWindow != window) {
            NotificationChain msgs = null;
            if (window != null)
                msgs = ((InternalEObject)window).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW, null, msgs);
            if (newWindow != null)
                msgs = ((InternalEObject)newWindow).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW, null, msgs);
            msgs = basicSetWindow(newWindow, msgs);
            if (msgs != null) msgs.dispatch();
        }
        else if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW, newWindow, newWindow));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<AlwaysOnActionSetType> getAlwaysOnActionSet() {
        if (alwaysOnActionSet == null) {
            alwaysOnActionSet = new EObjectContainmentEList<AlwaysOnActionSetType>(AlwaysOnActionSetType.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_ON_ACTION_SET);
        }
        return alwaysOnActionSet;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<AlwaysOffActionSetType> getAlwaysOffActionSet() {
        if (alwaysOffActionSet == null) {
            alwaysOffActionSet = new EObjectContainmentEList<AlwaysOffActionSetType>(AlwaysOffActionSetType.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_OFF_ACTION_SET);
        }
        return alwaysOffActionSet;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<ShowViewActionType> getShowViewAction() {
        if (showViewAction == null) {
            showViewAction = new EObjectContainmentEList<ShowViewActionType>(ShowViewActionType.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_VIEW_ACTION);
        }
        return showViewAction;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<ShowInTimeType> getShowInTime() {
        if (showInTime == null) {
            showInTime = new EObjectContainmentEList<ShowInTimeType>(ShowInTimeType.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_IN_TIME);
        }
        return showInTime;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<NewWizardActionType> getNewWizardAction() {
        if (newWizardAction == null) {
            newWizardAction = new EObjectContainmentEList<NewWizardActionType>(NewWizardActionType.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__NEW_WIZARD_ACTION);
        }
        return newWizardAction;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<PerspectiveActionType> getPerspectiveAction() {
        if (perspectiveAction == null) {
            perspectiveAction = new EObjectContainmentEList<PerspectiveActionType>(PerspectiveActionType.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__PERSPECTIVE_ACTION);
        }
        return perspectiveAction;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<HideToolbarItemIdType> getHideToolbarItemId() {
        if (hideToolbarItemId == null) {
            hideToolbarItemId = new EObjectContainmentEList<HideToolbarItemIdType>(HideToolbarItemIdType.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__HIDE_TOOLBAR_ITEM_ID);
        }
        return hideToolbarItemId;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<ViewType1> getView() {
        if (view == null) {
            view = new EObjectContainmentEList<ViewType1>(ViewType1.class, this, PerspectivesPackage.PERSPECTIVE_TYPE__VIEW);
        }
        return view;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public FastViewsType getFastViews() {
        return fastViews;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetFastViews(FastViewsType newFastViews, NotificationChain msgs) {
        FastViewsType oldFastViews = fastViews;
        fastViews = newFastViews;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS, oldFastViews, newFastViews);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
        return msgs;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setFastViews(FastViewsType newFastViews) {
        if (newFastViews != fastViews) {
            NotificationChain msgs = null;
            if (fastViews != null)
                msgs = ((InternalEObject)fastViews).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS, null, msgs);
            if (newFastViews != null)
                msgs = ((InternalEObject)newFastViews).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS, null, msgs);
            msgs = basicSetFastViews(newFastViews, msgs);
            if (msgs != null) msgs.dispatch();
        }
        else if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS, newFastViews, newFastViews));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getFastViewBars() {
        return fastViewBars;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setFastViewBars(String newFastViewBars) {
        String oldFastViewBars = fastViewBars;
        fastViewBars = newFastViewBars;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEW_BARS, oldFastViewBars, fastViewBars));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public LayoutType getLayout() {
        return layout;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetLayout(LayoutType newLayout, NotificationChain msgs) {
        LayoutType oldLayout = layout;
        layout = newLayout;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT, oldLayout, newLayout);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
        return msgs;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setLayout(LayoutType newLayout) {
        if (newLayout != layout) {
            NotificationChain msgs = null;
            if (layout != null)
                msgs = ((InternalEObject)layout).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT, null, msgs);
            if (newLayout != null)
                msgs = ((InternalEObject)newLayout).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT, null, msgs);
            msgs = basicSetLayout(newLayout, msgs);
            if (msgs != null) msgs.dispatch();
        }
        else if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT, newLayout, newLayout));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public byte getEditorAreaTrimState() {
        return editorAreaTrimState;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setEditorAreaTrimState(byte newEditorAreaTrimState) {
        byte oldEditorAreaTrimState = editorAreaTrimState;
        editorAreaTrimState = newEditorAreaTrimState;
        boolean oldEditorAreaTrimStateESet = editorAreaTrimStateESet;
        editorAreaTrimStateESet = true;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_TRIM_STATE, oldEditorAreaTrimState, editorAreaTrimState, !oldEditorAreaTrimStateESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void unsetEditorAreaTrimState() {
        byte oldEditorAreaTrimState = editorAreaTrimState;
        boolean oldEditorAreaTrimStateESet = editorAreaTrimStateESet;
        editorAreaTrimState = EDITOR_AREA_TRIM_STATE_EDEFAULT;
        editorAreaTrimStateESet = false;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.UNSET, PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_TRIM_STATE, oldEditorAreaTrimState, EDITOR_AREA_TRIM_STATE_EDEFAULT, oldEditorAreaTrimStateESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public boolean isSetEditorAreaTrimState() {
        return editorAreaTrimStateESet;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public byte getEditorAreaVisible() {
        return editorAreaVisible;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setEditorAreaVisible(byte newEditorAreaVisible) {
        byte oldEditorAreaVisible = editorAreaVisible;
        editorAreaVisible = newEditorAreaVisible;
        boolean oldEditorAreaVisibleESet = editorAreaVisibleESet;
        editorAreaVisibleESet = true;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_VISIBLE, oldEditorAreaVisible, editorAreaVisible, !oldEditorAreaVisibleESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void unsetEditorAreaVisible() {
        byte oldEditorAreaVisible = editorAreaVisible;
        boolean oldEditorAreaVisibleESet = editorAreaVisibleESet;
        editorAreaVisible = EDITOR_AREA_VISIBLE_EDEFAULT;
        editorAreaVisibleESet = false;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.UNSET, PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_VISIBLE, oldEditorAreaVisible, EDITOR_AREA_VISIBLE_EDEFAULT, oldEditorAreaVisibleESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public boolean isSetEditorAreaVisible() {
        return editorAreaVisibleESet;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public byte getFixed() {
        return fixed;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setFixed(byte newFixed) {
        byte oldFixed = fixed;
        fixed = newFixed;
        boolean oldFixedESet = fixedESet;
        fixedESet = true;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__FIXED, oldFixed, fixed, !oldFixedESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void unsetFixed() {
        byte oldFixed = fixed;
        boolean oldFixedESet = fixedESet;
        fixed = FIXED_EDEFAULT;
        fixedESet = false;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.UNSET, PerspectivesPackage.PERSPECTIVE_TYPE__FIXED, oldFixed, FIXED_EDEFAULT, oldFixedESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public boolean isSetFixed() {
        return fixedESet;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public float getVersion() {
        return version;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setVersion(float newVersion) {
        float oldVersion = version;
        version = newVersion;
        boolean oldVersionESet = versionESet;
        versionESet = true;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, PerspectivesPackage.PERSPECTIVE_TYPE__VERSION, oldVersion, version, !oldVersionESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void unsetVersion() {
        float oldVersion = version;
        boolean oldVersionESet = versionESet;
        version = VERSION_EDEFAULT;
        versionESet = false;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.UNSET, PerspectivesPackage.PERSPECTIVE_TYPE__VERSION, oldVersion, VERSION_EDEFAULT, oldVersionESet));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public boolean isSetVersion() {
        return versionESet;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
        switch (featureID) {
            case PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR:
                return basicSetDescriptor(null, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW:
                return basicSetWindow(null, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_ON_ACTION_SET:
                return ((InternalEList<?>)getAlwaysOnActionSet()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_OFF_ACTION_SET:
                return ((InternalEList<?>)getAlwaysOffActionSet()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_VIEW_ACTION:
                return ((InternalEList<?>)getShowViewAction()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_IN_TIME:
                return ((InternalEList<?>)getShowInTime()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__NEW_WIZARD_ACTION:
                return ((InternalEList<?>)getNewWizardAction()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__PERSPECTIVE_ACTION:
                return ((InternalEList<?>)getPerspectiveAction()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__HIDE_TOOLBAR_ITEM_ID:
                return ((InternalEList<?>)getHideToolbarItemId()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__VIEW:
                return ((InternalEList<?>)getView()).basicRemove(otherEnd, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS:
                return basicSetFastViews(null, msgs);
            case PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT:
                return basicSetLayout(null, msgs);
        }
        return super.eInverseRemove(otherEnd, featureID, msgs);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR:
                return getDescriptor();
            case PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW:
                return getWindow();
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_ON_ACTION_SET:
                return getAlwaysOnActionSet();
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_OFF_ACTION_SET:
                return getAlwaysOffActionSet();
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_VIEW_ACTION:
                return getShowViewAction();
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_IN_TIME:
                return getShowInTime();
            case PerspectivesPackage.PERSPECTIVE_TYPE__NEW_WIZARD_ACTION:
                return getNewWizardAction();
            case PerspectivesPackage.PERSPECTIVE_TYPE__PERSPECTIVE_ACTION:
                return getPerspectiveAction();
            case PerspectivesPackage.PERSPECTIVE_TYPE__HIDE_TOOLBAR_ITEM_ID:
                return getHideToolbarItemId();
            case PerspectivesPackage.PERSPECTIVE_TYPE__VIEW:
                return getView();
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS:
                return getFastViews();
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEW_BARS:
                return getFastViewBars();
            case PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT:
                return getLayout();
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_TRIM_STATE:
                return getEditorAreaTrimState();
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_VISIBLE:
                return getEditorAreaVisible();
            case PerspectivesPackage.PERSPECTIVE_TYPE__FIXED:
                return getFixed();
            case PerspectivesPackage.PERSPECTIVE_TYPE__VERSION:
                return getVersion();
        }
        return super.eGet(featureID, resolve, coreType);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @SuppressWarnings("unchecked")
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR:
                setDescriptor((DescriptorType)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW:
                setWindow((WindowType)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_ON_ACTION_SET:
                getAlwaysOnActionSet().clear();
                getAlwaysOnActionSet().addAll((Collection<? extends AlwaysOnActionSetType>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_OFF_ACTION_SET:
                getAlwaysOffActionSet().clear();
                getAlwaysOffActionSet().addAll((Collection<? extends AlwaysOffActionSetType>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_VIEW_ACTION:
                getShowViewAction().clear();
                getShowViewAction().addAll((Collection<? extends ShowViewActionType>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_IN_TIME:
                getShowInTime().clear();
                getShowInTime().addAll((Collection<? extends ShowInTimeType>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__NEW_WIZARD_ACTION:
                getNewWizardAction().clear();
                getNewWizardAction().addAll((Collection<? extends NewWizardActionType>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__PERSPECTIVE_ACTION:
                getPerspectiveAction().clear();
                getPerspectiveAction().addAll((Collection<? extends PerspectiveActionType>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__HIDE_TOOLBAR_ITEM_ID:
                getHideToolbarItemId().clear();
                getHideToolbarItemId().addAll((Collection<? extends HideToolbarItemIdType>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__VIEW:
                getView().clear();
                getView().addAll((Collection<? extends ViewType1>)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS:
                setFastViews((FastViewsType)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEW_BARS:
                setFastViewBars((String)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT:
                setLayout((LayoutType)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_TRIM_STATE:
                setEditorAreaTrimState((Byte)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_VISIBLE:
                setEditorAreaVisible((Byte)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__FIXED:
                setFixed((Byte)newValue);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__VERSION:
                setVersion((Float)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID) {
        switch (featureID) {
            case PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR:
                setDescriptor((DescriptorType)null);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW:
                setWindow((WindowType)null);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_ON_ACTION_SET:
                getAlwaysOnActionSet().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_OFF_ACTION_SET:
                getAlwaysOffActionSet().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_VIEW_ACTION:
                getShowViewAction().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_IN_TIME:
                getShowInTime().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__NEW_WIZARD_ACTION:
                getNewWizardAction().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__PERSPECTIVE_ACTION:
                getPerspectiveAction().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__HIDE_TOOLBAR_ITEM_ID:
                getHideToolbarItemId().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__VIEW:
                getView().clear();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS:
                setFastViews((FastViewsType)null);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEW_BARS:
                setFastViewBars(FAST_VIEW_BARS_EDEFAULT);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT:
                setLayout((LayoutType)null);
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_TRIM_STATE:
                unsetEditorAreaTrimState();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_VISIBLE:
                unsetEditorAreaVisible();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__FIXED:
                unsetFixed();
                return;
            case PerspectivesPackage.PERSPECTIVE_TYPE__VERSION:
                unsetVersion();
                return;
        }
        super.eUnset(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case PerspectivesPackage.PERSPECTIVE_TYPE__DESCRIPTOR:
                return descriptor != null;
            case PerspectivesPackage.PERSPECTIVE_TYPE__WINDOW:
                return window != null;
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_ON_ACTION_SET:
                return alwaysOnActionSet != null && !alwaysOnActionSet.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__ALWAYS_OFF_ACTION_SET:
                return alwaysOffActionSet != null && !alwaysOffActionSet.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_VIEW_ACTION:
                return showViewAction != null && !showViewAction.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__SHOW_IN_TIME:
                return showInTime != null && !showInTime.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__NEW_WIZARD_ACTION:
                return newWizardAction != null && !newWizardAction.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__PERSPECTIVE_ACTION:
                return perspectiveAction != null && !perspectiveAction.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__HIDE_TOOLBAR_ITEM_ID:
                return hideToolbarItemId != null && !hideToolbarItemId.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__VIEW:
                return view != null && !view.isEmpty();
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEWS:
                return fastViews != null;
            case PerspectivesPackage.PERSPECTIVE_TYPE__FAST_VIEW_BARS:
                return FAST_VIEW_BARS_EDEFAULT == null ? fastViewBars != null : !FAST_VIEW_BARS_EDEFAULT.equals(fastViewBars);
            case PerspectivesPackage.PERSPECTIVE_TYPE__LAYOUT:
                return layout != null;
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_TRIM_STATE:
                return isSetEditorAreaTrimState();
            case PerspectivesPackage.PERSPECTIVE_TYPE__EDITOR_AREA_VISIBLE:
                return isSetEditorAreaVisible();
            case PerspectivesPackage.PERSPECTIVE_TYPE__FIXED:
                return isSetFixed();
            case PerspectivesPackage.PERSPECTIVE_TYPE__VERSION:
                return isSetVersion();
        }
        return super.eIsSet(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public String toString() {
        if (eIsProxy()) return super.toString();

        StringBuffer result = new StringBuffer(super.toString());
        result.append(" (fastViewBars: "); //$NON-NLS-1$
        result.append(fastViewBars);
        result.append(", editorAreaTrimState: "); //$NON-NLS-1$
        if (editorAreaTrimStateESet) result.append(editorAreaTrimState); else result.append("<unset>"); //$NON-NLS-1$
        result.append(", editorAreaVisible: "); //$NON-NLS-1$
        if (editorAreaVisibleESet) result.append(editorAreaVisible); else result.append("<unset>"); //$NON-NLS-1$
        result.append(", fixed: "); //$NON-NLS-1$
        if (fixedESet) result.append(fixed); else result.append("<unset>"); //$NON-NLS-1$
        result.append(", version: "); //$NON-NLS-1$
        if (versionESet) result.append(version); else result.append("<unset>"); //$NON-NLS-1$
        result.append(')');
        return result.toString();
    }

} //PerspectiveTypeImpl
